package goodroommate.service.impl;

import java.util.ArrayList;

import goodroommate.dal.DatabaseSession;
import goodroommate.dao.ITypeDao;
import goodroommate.dao.impl.TypeDao;
import goodroommate.domain.Type;
import goodroommate.exception.DatabaseException;
import goodroommate.service.ITypeService;

public class TypeService implements ITypeService {
	ITypeDao typeDao = new TypeDao();

	@Override
	public ArrayList<Type> getAllTypes() throws DatabaseException {
		try(DatabaseSession databaseSession=new DatabaseSession()){
			return typeDao.getAllTypes(databaseSession);
		}
	}

}
